package com.k.atomikos.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.jta.JtaTransactionManager;

import javax.transaction.TransactionManager;
import javax.transaction.UserTransaction;


@Configuration
public class JtaTransactionManagerConfig {
    @Bean(name = "xatx")
    public JtaTransactionManager regTransactionManager() {
        TransactionManager userTransactionManager = null;
       // = new UserTransactionAdapter();
        UserTransaction userTransaction = null;
        //= new UserTransactionAdapter(userTransactionManager);
        return new JtaTransactionManager(userTransaction, userTransactionManager);
    }
}
